<?php

/* phone.html */
class __TwigTemplate_4890e0ac9785b098a4bcbb3c5c13169c extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("layout.html");

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "layout.html";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_title($context, array $blocks = array())
    {
        echo "Phone Management";
    }

    // line 6
    public function block_content($context, array $blocks = array())
    {
        // line 7
        echo "<ul class=\"nav nav-tabs custom-tab\">
    <li class=\"active\"><a href=\"#\" data-toggle=\"tab\"><i class=\"icon-list\"></i><span>Phones</span></a></li>
    <li><a href=\"";
        // line 9
        echo twig_escape_filter($this->env, (isset($context["base_url"]) ? $context["base_url"] : null), "html", null, true);
        echo "admin/phone.php?action=add\" data-toggle=\"tab\"><i class=\"icon-plus\"></i><span>Add New Phone</span></a></li>
</ul>
<div class=\"user-list\">
    <h2>User Management</h2>
    <table class=\"table table-striped table-bordered table-condensed\">
        <thead>
            <tr>
                <th>Photo</th>
                <th>Model</th>
                <th>Status</th>
                <th>Price</th>
                <th>Action</th>
            </tr>

        </thead>
        <tbody>
            ";
        // line 25
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["phone"]) ? $context["phone"] : null));
        foreach ($context['_seq'] as $context["_key"] => $context["phone"]) {
            // line 26
            echo "            <tr>
                <td>    </td>
                <td>";
            // line 28
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["phone"]) ? $context["phone"] : null), "model"));
            echo "</td>
                <td>";
            // line 29
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["phone"]) ? $context["phone"] : null), "status"), "html", null, true);
            echo "</td>
                <td>";
            // line 30
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["phone"]) ? $context["phone"] : null), "price"), "html", null, true);
            echo " </td>
                <td>
                    <a href=\"";
            // line 32
            echo twig_escape_filter($this->env, (isset($context["base_url"]) ? $context["base_url"] : null), "html", null, true);
            echo "admin/phone.php?action=edit&phone_id=";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["phone"]) ? $context["phone"] : null), "id"), "html", null, true);
            echo "\" rel=\"tooltip\" title=\"Edit\" ><i class=\" icon-pencil\"></i></a>
                    <a href=\"";
            // line 33
            echo twig_escape_filter($this->env, (isset($context["base_url"]) ? $context["base_url"] : null), "html", null, true);
            echo "admin/phone.php?action=view&phone_id=";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["phone"]) ? $context["phone"] : null), "id"), "html", null, true);
            echo "\" rel=\"tooltip\" title=\"View\"><i class=\"icon-eye-open\"></i></a>
                    <a href=\"";
            // line 34
            echo twig_escape_filter($this->env, (isset($context["base_url"]) ? $context["base_url"] : null), "html", null, true);
            echo "admin/phone.php?action=delete&phone_id=";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["phone"]) ? $context["phone"] : null), "id"), "html", null, true);
            echo "\" rel=\"tooltip\" title=\"Delete\" class=\"delete\"><i class=\"icon-remove\"></i></a>
                </td>
            </tr>  
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['phone'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 38
        echo "        </tbody>
    </table>
</div>
<div id=\"modalDelete\" class=\"modal hide\">
    <div class=\"modal-header\">
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\">x</button>
        <h3>Confirm delete user</h3>
    </div>
    <div class=\"modal-body\">
        <p>Do you want to delete user?</p>
    </div>
    <div class=\"modal-footer\">
        <a href=\"#\" class=\"btn\" data-dismiss=\"modal\">No</a>
        <a href=\"#\" id=\"deleteLink\" class=\"btn btn-primary\">Yes</a>
    </div>
</div>
<script src=\"";
        // line 54
        echo twig_escape_filter($this->env, (isset($context["base_url"]) ? $context["base_url"] : null), "html", null, true);
        echo "/admin/js/bootstrap-modal.js\"></script>
<script>
    \$(document).ready(function(){
        \$('a[rel=\"tooltip\"]').tooltip();
        
        //Delete user
        \$('.delete').click(function(e){
            var deleteURL = \$(this).attr('href');
            \$('#deleteLink').attr('href', deleteURL);
            
            \$('#modalDelete').modal({
                keyboard: false
                
            });
            e.preventDefault();
        })
        
    })
</script>
";
    }

    public function getTemplateName()
    {
        return "phone.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  122 => 54,  104 => 38,  92 => 34,  86 => 33,  80 => 32,  75 => 30,  71 => 29,  67 => 28,  63 => 26,  59 => 25,  40 => 9,  36 => 7,  33 => 6,  27 => 3,);
    }
}
